/******************************************************************************
*   Project:		DotNetCRM 
*	Filename:		Company.cs
*	Author:			Kristopher Cargile <kris@kriscargile.com>
*	Date Created:	07/02/2008
*******************************************************************************
*	Change History: 
*******************************************************************************
* IMPORTANT GNU LICENSE INFORMATION. DO NOT REMOVE THIS SECTION!
*
* DotNetCRM :: Copyright (c) 2005-2008, Cargile Technology Group, LLC
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
******************************************************************************/

using System;
using System.Runtime.Serialization;
using System.Data;

namespace DotNetCRM.Core
{
    /// <summary>
    /// A company.
    /// </summary>
    [Serializable]
    [DataContract]
    public class Company : DomainObject
    {
        /// <summary>
        /// Gets or sets the tax id (FEIN) number of the company.
        /// </summary>
        [DataMember]
        public string TaxId { get; set; }

        /// <summary>
        /// Gets or sets the industry type ids associated with this company.
        /// </summary>
        [DataMember]
        public int[] IndustryTypeId { get; set; }

        /// <summary>
        /// Gets or sets the location ids for the account.
        /// </summary>
        [DataMember]
        public int[] LocationId { get; set; }

        /// <summary>
        /// Gets or sets the telephone number for the account.
        /// </summary>
        [DataMember]
        public string TelephoneNumber { get; set; }

        /// <summary>
        /// Gets or sets the fax number for the account.
        /// </summary>
        [DataMember]
        public string Fax { get; set; }

        /// <summary>
        /// Gets or sets the primary email address for the account.
        /// </summary>
        [DataMember]
        public string EmailAddress { get; set; }

        /// <summary>
        /// Gets or sets the website URL for the account.
        /// </summary>
        [DataMember]
        public string Url { get; set; }

        /// <summary>
        /// Gets or sets the nuumber or employees at the company.
        /// </summary>
        [DataMember]
        public int? NumberOfEmployees { get; set; }

        /// <summary>
        /// Gets or sets the number of locations the company has.
        /// </summary>
        [DataMember]
        public int NumberOfLocations { get; set; }

        /// <summary>
        /// Loads an object from persistent storage. 
        /// </summary>
        /// <param name="id">Id of the record to load.</param>
        public override void Load(int id)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Loads a list of objects from persistent storage. 
        /// </summary>
        public static Company[] Load()
        {
            // TODO: what's the best way to handle selection criteria?
            throw new NotImplementedException();
        }

        /// <summary>
        /// Adds or updates the object in persistent storage. 
        /// </summary>
        /// <param name="txn">An <see cref="IDbTransaction"/> to execute the 
        /// operation within.</param>
        /// <returns>Number of records affected.</returns>
        public override int Save(IDbTransaction txn)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Adds or updates a batch of objects in persistent storage. 
        /// </summary>
        /// <param name="list">List of records to add or update.</param>
        /// <returns>Number of records affected.</returns>
        public static int Save(Company[] list)
        {
            return Company.Save(list, null);
        }

        /// <summary>
        /// Adds or updates a batch of objects in persistent storage. 
        /// </summary>
        /// <param name="list">List of records to add or update.</param>
        /// <param name="txn">An <see cref="IDbTransaction"/> to execute the 
        /// operation within.</param>
        /// <returns>Number of records affected.</returns>
        public static int Save(Company[] list, IDbTransaction txn)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Deletes the object from persistent storage. 
        /// </summary>
        /// <param name="txn">An <see cref="IDbTransaction"/> to execute the 
        /// operation within.</param>
        /// <returns>Number of records affected.</returns>
        public override int Delete(IDbTransaction txn)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Deletes a batch of objects from persistent storage. 
        /// </summary>
        /// <param name="list">List of records to add or update.</param>
        /// <returns>Number of records affected.</returns>
        public static int Delete(Company[] list)
        {
            return Company.Delete(list, null);
        }

        /// <summary>
        /// Deletes a batch of objects from persistent storage. 
        /// </summary>
        /// <param name="list">List of records to add or update.</param>
        /// <param name="txn">An <see cref="IDbTransaction"/> to execute the 
        /// operation within.</param>
        /// <returns>Number of records affected.</returns>
        public static int Delete(Company[] list, IDbTransaction txn)
        {
            throw new NotImplementedException();
        }
    }
}
